Fixed examples, closed #15 and tests for it