Simplified if.. else.. statements.
Removed unused code.
Small refactoring of "exec_pip_commands".