Moved Connection size checks to separate functions