Added Rendering class and did some minor code cleaning here and there