Moved functions into ged2 schema, added some missing comments