<DE2>Fix memory leak
<DE2>Clean up unused variables and functions
<DE2>Clean up