Refactor table

@mortenvp @petya2164 any comments?