Added functionality to buttons, will cleanup a bit later