command line now Py3k compatible.
Battery now py3k compatible.
Add json test files.
More cleanup.