Some GUI enhancements and refactors