examples and tests refactor

remove extraneous examples, remove tests for api and replace with unit tests for library itself, fix examples

closes #38 and #39