javascript cleanup dead/old code