Fixing NPE caused by repetitive connection removal. Private methods don't need to be declared final. Using diamond operator. Removing unnecessary ArrayList operations.
Merge pull request #12 from andredasilvapinto/upstream

Fixing NPE while removing connection