Added direct instance register method.

Added test.