fixed a couple of bugs in desugar, added tests for desugar, reorganized all tests