Added dialogs

Also made shadows more like Scratch and exported some low-level utilities.