Fine tuned output for clarity
Refactored main script