moved to Reference, added some functions