Implemented a cropping mode. Fixes #256
Merge pull request #256 from christeredvartsen/issue-256

Improved crop functionality