Some preparation for refactoring