remove unused functions
fix some test peculiarities

mostly fixed strange json behavior
because tests run python code from strings pyflakes was not detecting proper import usage
Merge pull request #126 from pkit/tests_fix

fix some test peculiarities
Merge pull request #125 from pkit/minor_fixes

remove unused functions