Added stopwatch and modified database init