Removing unnecessary TRACE statements