Cleaning and optimizing code for "use strict" support