refactor - move tracking logic to higher method, fix bugs in data reported
complete tests for email; also including database.yml - the one in master has a "password" line instead of a "username" line.