Merge in the changes made for previous releases

Releases 3.0.4, 4.0.0-m2 and 4.0.0-m2-luna were made off branches
from a big wip branch. Apply the content of the tags to master.
Merge pull request #53 from skyluc/issue/sync-previous-releases

Merge in the changes made for previous releases