Revert "Revert "Merge pull request #519 from tlex/dev""

This reverts commit 47573741adef17d4a49f09c1de5c0f2912e34071.