refactored connection code, quick connect added