Addressed review comments for #798.

- Encapsulated parameter handling in a function.
- Fixed typos in marathon.proto and docs.