A bunch of minor improvements (codestyles etc)