Images now render correctly when viewing direction is changed. Class is
very messy and requires a lot of modifications to remove duplicate cod
but at least it works correctly as of now.