Added JSONWriter class; beginning to refactor pylibpll.
Made fix to pll.py to adjust for refactoring.
Cleaning some bugs left from refactoring code.