Add rendering framework

State can transfer from Engine to Renderer
Also some cleanup