More functions wrapped, more refactoring, etc.