Renaming vars for enhanced readability.
Restructered the way to include shared code.