Started to get familiar with javascript, started to move some code to its proper place (rendering in RenderManager etc)