Added start of rendering, fixed bugs with classes