adding db.rename() helper method, cleaning up some whitespace