Bug fixes and improvements
Merge branch 'dev'