some cleanup for 2 and 10.js