Removed log statements
Fixed trim bug