Fix console build
Fix warnings about deprecated functions