Fixed usage of basestring
Converted from Extension class to register method