fixed bugs and cleaned up button layout