Refactored comment partial to use helper method instead of local variables