Added solve puzzle/Fixed quit bug/Cleaned up code