Minor adjustments to make more generic