Added code from pull request made by Starz0r (https://github.com/Starz0r)
Removed commented out code
Added returns to voids to prevent memory leaks
moved main() function to end of program to stop gcc warnings
fixed a line where a const was missing the const in the definition
removed #include <SDL2/SDL_image.h> due to it not being required and not listed in the dependencies