finished rendering engine refactor