corrected issues with the memory leaks related to app(sfml still not), refactoring and some other minor changes