Added export, normalized functions, more proper hash merge and access