Added the gameplay feature and refactored most of the stuff.