Comments and fix getSelectorForType() bug.
Cleanup.
Better organisation.
Lots of microoptimisations for super-large doms.