Initial import from NTRTsim