Created a working version that relies on server-side as little as
possible.