It would be nice if this file could be commented. This is some ninja bash stuff (at least, from my perspective), so when someone else comes to look at this, they'll probably appreciate some good comments.