Minor improvements of code.