Added formatter test. Some cleanup.
Added dea detector test.