JavaScript cleanup

Change-Id: Ib96c8cb37ed140baadbbc80fa4b68f4614d97cda