refactored the order model, cleaned it up and extracted bigger functionality into smaller methods, which are much easier to test now.