Refactor/table rendering

Strings manipulation is faster than loads of 'DOM' manipulation on the server. Let's use strings.
Any chance we can join these with `\n` so the source isn't horrific?