Lots of bug fixes, added selection to buttons