Fix core functions and crlf stuff