Made dialog actually work, other little changes too