First pass at JS cleanup