improved the button handlers and element placements