A few structural changes to break down this script into easily manageable parts.
Merge pull request #2 from okonomiyaki3000/a_few_minor_suggestions

A few structural changes to break down this script into easily manageable parts.