Refactored out all of trapModel into functions. Wrapped results (x, t, eta) in structures.