Examples

This resolves #15 
It also fixes a few bugs.