major code reshuffling, better input and render pipeline
need to find a way to get extend viewport to work