Clean up some resources once they are no longer required