Added assert library and tested it to make sure it works with g++.
Replaced checks in graphics class with assert. Also added defaults to all switch statements eliminating a warning I had disabled.
Fixed memory leak.