bugfixes and refactor
Merge branch 'master' of https://github.com/carlsborg/dust