cleanup
more replacing of old implementation.
deprecation stuff