Refactor/table rendering

Strings manipulation is faster than loads of 'DOM' manipulation on the server. Let's use strings.
`label` is a confusing variable name here.