Working code changing emails

Pull the code from this branch to test and if ok for you please merge.
I had to change the code though, set up rules in an object hash then loop through the hash.
Also added another test in spec :) all is working when i tested