Cleaning code, hunting memory leaks...