Initial implementation of update state feature. Refactored add state
dialog into separate JavaScript file. Various miscellaneous cosmetic
features.