Removed redundant init code, changed to call class method for type checking.
Updated version.