Add more tests and examples

Ref. #1. Closes #3.