Refactoring and polishing.