added swig support to create a python wrapper as well as other minor
changes