Making considerable changes to reference management to make it more flexible for when we need to edit references or add new ones in the database.