Merging dev into master

Merging current state of dev branch into master.