added constructor and cleaned up example
Merge pull request #15 from coleww/add-external-constructor

added constructor and cleaned up example