add Travis config
refactor types
implement type equality