Major overhaul

added error handling, implemented new Omeka_form, fixed many bugs,
commented much code.