First commit, starting the basic EM implementation