Apparently TSO Host got fed up of hosting my site and deleted all of my data. I was able to recover almost everything from a recent backup but sadly the original of this post has been consigned to oblivion.
I debated writing it again but I think my limited time would be better spent writing something new.
Instead, I shall just present the source code and leave it as an exercise for the reader to figure it out:
Here is what the app looks like now:
We'll fix some bugs!