Keyword extension for JSON pretty printing and code cleanup

Sorry to bundle all of this into one pull request.  This is my first foray into this type of thing and I didn't know better.

There are three main changes:
1) Added an parameter, pretty_print, to TO JSON that allows users the option to have the JSON returned in pretty print format.  The parameter defaults to FALSE (don't make the change).

2) I moved the function, _get_url, lower in the file, in order to group keywords and internal functions together.  This is a readability change.

3) Finally, I added the underscore, '_,' to the functions that looked to be the internal ones.  This way the HTML doc will not display them.