Implemented layout loading and saving.