linux compile fixes and some more legacy conversions