Fixed event grabbing
Added basic dialog functionality