Wrapping image by crop container and some refactoring of main functionality.