Added renaming function to the library.  Currently untested and very
basically implemented (really ugly)