Added trait. Minor fixes. Added Travis file.