Refactoring after review