major cleanup 4.x legacy API