move tests into unit test file; handle command line input