Improves html client code and test slightly