Updated copyright and refactored some of the rendering code