Fixed projects compilation, finished porting to SDL2