Little fixes before refactoring