refactored/cleaned up config file and main index file. added comments to sipgateio.class