Ensure compatibility with old versions of Perl.
Clean up conditionals. Generalize and modularize command execution.
Add more OS detail collection.