fix IFS handling, add explicit declares