Change PATH to include GNU coreutils and refactor