Mainly improves the offset management making it less error prone, encapsulating the write operation and offeset management into write-* operations with proper asserts for the expected heap type.