Implemented a imnage similarity score (will be replaced by a better one), also fixed the trim crop window