Fix #2 and #3. Add tests for image compare function