Refactor utils and add registration and grid emails