Alma update

This PR may seem larger then it is as a lot of the stuff is simply updating of the coding style to match Drupal standard.

It includes fixes cherry-pick from DBC that ding2tal have been able to verify working.