Add a registration function; nogil some things for thread usage