Changed hg_interface to accept references instead of pointers