Added a timeout to connecting to the server
- Removed Unused Imports