Adding Drupal 11 compatibility, refactoring to match code standards and best practices.