Pull request for Issue665

@dretrex 
@davidChevrier 
What is the reason for using a friend class here?  In general, friend classes should be avoided because something like a collection should just be able to get everything it needs from getters and setters.