Minor improvements.
refactoring