Fixed a few tests and some minor tweaks
Merge remote-tracking branch 'origin/master'