This should fix #4 and improve code quality
Merge branch 'fix-issue-4'