Code cleanup

Removed unused code from rendering_task
Added some documentation