minor refactoring and code cleanup. also added a getter method to return the piece at a givin location.