Refactoring, mostly to avoid duplicate code