Convert jsw2ctl.py into a module and use it in jswtest.py