cleanup of core code without changing the interface