Restructure code, rename LinearInterpolation->Linear
Make flag types immutable, include ExtrapConstant in codegen