Some tweaks to DirectX initialization + other small tweaks

BlockScope was not working for some people, this commit tries to fix
that by changing the DirectX initialization code and providing slightly
better error messages.