Moved registry_key class in a separate file