Modifications to use single awk commands