Tabular legend stuffz

Forgot to push last weeks changes, so a lot of in between work is
missing, but the latest code is here