Global variable g_tick is used only by MainFrame, now it is member data.
MainFrame timer: refactoring, bells are now not global anymore.