Renamed variable location to pieceLocation
Removed unused methods
Code optimisation.