Converting all modeling functions over to NJS