Updated gitignore so things are cleaner.

Also started refractoring EMD CODE!`