memory cleanup for GUI elements, Closes #13