Cleaned up code and checked return value in RenameOP