Rebuilding API logic.