fixed casting on MyHeapFree pointer arithmetic and added some documentation
fixed merge conflict