code cleanup, google closure compil and optim