small table code improvements