Moved custom elements to subclasses as per pull request comments
Added nil check to static reference to avoid reinitializing