Fix flaws pointed by EPV. Minor fixes.