Add withredline option; Fix some new line issues