Fixed some bugs and errors starting on main layout features.