Fourth commit - more refactoring