photo option and database

photo option skeleton, various fixes and new database dump