Working client side version

This has been stripped down to have only a few operations that touch the
DOM