Added comments for expression formatting function