Refactoring.
Removed unused property.
Fixed wrong difinition.
Refactored connection process.
Cosmetic changes.