Fix new line handling and startup speed