slightly more JSON purism, and treating the ruby code more as a library rather than one off scripts