Changed the code to use newly introduced SFML window and input.