Some trivial code improvements