Major update. New database schema for resources to fix some issues with forign keys preventing new resources from being added in previous builds.