App Engine compatibility, refactor writing of config files and email sending, much polishing, many fixes