free some memory and stuff