clean up
manual merge. closes #39. closes #42.
updated demo to test issue #41.