Layouts set up and some bugs fixed