Remove deprecated warnings from core and sample code

Our code should not have deprecation warnings