Updated to latest version - many code layout changes and email on/off added

First Commit