Refactored and added SFML support.