shellcheck.net pass #2. Converted all printf to echo since it's easier, may convert back later if given good reason.