Background code refactored.