Add image class
Add debug flag
Remove stuff from main.cpp