Replace innertext usages with helper functions