refactored image scanner. Added Photo class