cleaned up LayoutTable and added tests