seperated out api from command line functionality and got the rucursive file listing fully working