Added options connection.
Added preferences controller.
Renamed the click function to accommodate more save on $scope.
Bug fix and removed unused lib.