Updates formatting on doc recently moved from wiki

This PR closes issue #1283.

Changes to Restructured text to clean up file.
I'd prefer "imagine this function is defined in" or "imagine we have the following code in" or something. But +1 tt formatting!!