Add tests and usage doc