Add more tests, update travis for encoding.