Enhanced the comments to clearly show how this relates to the Template Method pattern.