Refactor GUI classes