Json method transfer

Moved all methods out of json (since they aren't compatible) and into
the main .js file.  Created an object to hold them.  Also made small
changes to the code to "clean it up" a bit.