in the process of adding lots of documentation

also:
1. some structural changes.
2. moved the example from the readme to test/example.js