OPTIONAL support + miscellaneous cleanup