Deprecated API usage and other warnings removal