Added end brace to cleanup function

I've added an end brace to the clean up function.