Add more tests and examples

Ref. #1.