Stylistic changes

I was using the hashim style before, here's the
separate concerns style.

@see http://blog.separateconcerns.com/2014-01-03-lua-module-policy.html
Extract the email regex outside of the function
s/assert/assert_email via @soveran

Avoid confusion with the global `assert` function of lua.