Change to chain, make travis test suite pass

Performance improvments