Rewrite parts of the API