the dialog looks bad sorry to say at least have it do some calc functions or at the very least aline it better.
i see no point in the dialog part of ur script. as for the other part the colors are horrible. you dont check what vars are off and you dont unset any vars at all.
why dont you go look at a few calc scripts and get an idea on how to make it beter.