Fixed memory errors and added raw image output
Fixed y-axis flipping in converting screen coords to logical coords
Corrected aspect ratio of logical space based on screen size
Removed raw writer and dead code