-ported build process to new Package/Variant class
-got rid of clunky load_metadata function in resources, use Package instead
-various bugfixes