Made changes to connection class
Cleaned up indentation of code in spec
Fixed merge conflict
Merge branch 'connection_fixes'