fixes #2 - Windowing is now supported, also refactored the code so scanline rendering is nicer for both windowing and background rendering