Lots of stuff - rewrite of render and init