Avoiding leaks in the first place.. what to do?