Bug Fixes

I wasn't calling json correctly, also fix a few other obvious bugs I came across.