Cut down, sane JS and supporting HTML modifications