Fixed examples, closed #15 and tests for it

The examples were broken, so I fixed them too.