fixed some minor refactoring issues in ui