More features and switched optionalFeature to true/false instead of 1/0 for readability.