Fixed coding style issues, used camelCase for method names,
Fixed connect method's parameter issue and some code optimization