Slight refactoring and renamings