closes #2 - clean up messy client-side js, and implement the ThreadView in a way that doesn't require a server roundtrip