Tests and docs

Add tests, documentation and travis support