A bag of fixes for clang errors

Should fix a number of bugs in clang++
Merge branch 'master' into feature/improve_makefiles