Fixed a crash that would occur if a new watch were added by entering a watch name.
Code style updates.