REFERNCE: gw.py updated to work with comman line and with more smart parsing of input parameters.