Wrote the EM part in day 2.
Added some files for the EM part in day 2.
Updated and merged.