Sourcemaps; misc tidy ups