Fixed some layouts, added button functions