Update main.sh per line notes

Changed script to comply with notes from @dnschneid - hopefully. :)
Testing results will follow.