Perform various maintainance tasks.