Refactoring UI classes out of UI module