Rebuilding rails