Refactored to better use collector. Thanks for the tips, @barryvdh!
Updated documentation