Credited the bithacks site for the reverse function.  This code
snippet is listed in the public domain on that site.