Refactor to remove unnecessary references to 'this'

Add extra cases to supported element types, add createSubscription
and createPublisher to public API