Fixed initialization of timeslice and timeskip, added more layout cache management