Button handling and layout of UI