Added correct extend defaults method in.

Needs major refactoring and the example HTML fixed up to use build.