General function enhancements.