Added activity indicator and threading for solve function.
Fixed various bugs to do with the buttons being pressed when they're not supposed to.