refactor cli table into own module