Fix and update examples

This pr is working towards #20.