Large pull request with a bunch of minor and major changes

Changes from SDU.