Code cleanup

Trying to improve readability (according to Perl Best Practices Chapter 2, Code Layout)