Added connect/disconnect functionality to the model and changed controller.
Refactored.
Added reconnect functioanality.