Registering required RPs from template metadata (1588437, 2002449)

just reordering exported functions to appear before private ones. No change in the function body