Runnable examples, build fixes

Hi, I was giving your library a poke and thought it would be nice to include runnable examples.  Also fixed some build errors prior to that.

Let me know if anything is not to your liking.

Regards,
Stacey Ell