remove use of awk for ios compliance, fix other stuff