Refactored cleanup and works properly now.

Signed-off-by: retep998 <retep998@verizon.net>