<DE2> Clean up and fix some minor bugs