Edited the constructor so it allows the collection to passed to this
class.