Begin integrating logic for METS generation, general cleanup