Added documentation on memory layout