Added the gameplay feature as well as refactoring.