cleaning up sourcemaps: refactorings, a couple tests