refactoring and commenting on core $argv