Finally done refactoring renderer