Refactored the autoloader for the CLI scripts