Added functions to free object registeries