More changes! Mostly small refactoring and rendering.