move some functions into Utils
add some basic command line parsing
validate command line arguments