Tighten up code

        - Remove unused JSON functions
Move some utility functions to Utils
Refactor to use StackStream.stack