clean up
Added examples

This is a fairly complete set of reorganized code.
Merge branch 'develop2'