Finished fixing up SAP interp. Moved non-templated code to cpp files.