Fixed indexOutOfBounds in Calculations

Speed and time array should be the same size; also added console
statements for connection errors.