Fixed some bugs and worked on layout