Factored out SchemeVal datatype to separate module