Maintenance function.