Updated to reflect new features and refactoring.