Connection issues

This addresses #93 by merging @kaero original work into master, finishes tests, calls callback when there is a connect timeout.