Adding methods. Checkpoint to fix breakage.
Adding rudimentary toplevel method declarations.

This is becoming a huge cl but we're getting close.
First pass at adding toplevel methods.

[#58142518]
[#55540950]
Self-review.

There's a lot more left to do on this CL but I'll do that in follow-up CLs.
This one has already grown way too big and needs to go in.