Fixed escape function behavior with line breaks.
Changed daemon initialization.