Refactor the Collector class & update comments.