Fix tests for hookable and add factory() function