Added test files. Fixed bugs with email FSM