code cleanup
Merge branch 'master' into multidirs
Merge branch 'multidirs' into beta