Garbage collection and general cleanup.