Changes towards linux build. Still needs fixing!