Cleanup, Bugfixes

-ED and EO Bugfixes
-A bit of cleanup for ED