For every place that you added comments here, I would create a new function with a descriptive name if possible.