Added tests
More refactoring to deal with change to EM
Refactored preset state