Add some utility methods and register function.