user interface refactor to table blocks and UI class