Refactor/table rendering

Strings manipulation is faster than loads of 'DOM' manipulation on the server. Let's use strings.
Same thing about keeping opening and closing tags together.