Further refactoring
Merge branch 'dev'