Implemented cropping, +minor bugfixes