Added all button handling logic - need to add configuration now.