refactor & implement test for 'create table' from cli arguments

Signed-off-by: Joshua Paling <joshua.paling@gmail.com>