More platform independence and stupid bux fixes