Trim all whitespace (inc. \n), ignore empty lines
Added dedupe functionality (emulating TCollector)