variable renaming, refactoring to setscheme, more tests