Added workspace changing when buttons are pressed
General refactoring