moved functions that should be accessible to both halves to a common trait, added closing functionality
switched inner.capacity for max_capacity()