Normalized some methods to be cross-browser capable.
Implemented childrenOfType method.