More refactoring, focus on graphics and ui