Added the possibility to switch visualization modes by pressing the space bar.
Fixed a bug where trying to set the color of a pixel outside the boundaries of the surface would make the program crash.