Refactoring, some new graphics stuff