Mess of changes to getting the buttons working