Changes to partition layout. Bug fixes