Homework 3 - Refactoring, move finding and sorting to the model.