Many improvements

Added callback function, improved mouse detection, better resizing,
started working on crop ratio.