Image cropper refactor

Refactoring the image cropper to be hopefully a little more clear, and easy to understand.