some minor refactoring and cleanup. Preparing to split up project commands