Partial conversion from windows to linux.