Started to consolidate the EMF code