Reorganised, and added more variables to the build.

Reorganised code structure (simplified).
Added variable expansion.
Added variables to the build parameters.
Parsed email body content for build parameters.
Moved files.