Updated in accordance with recent refactoring changes.