Reordered functions.
Added back missing _buildUrl function.
Implemented the rename function.