More refactoring. Need to impl proper substitution.