Added automatic database switching.
Added support for differential required times.
Made the web interface recognize differnetial periods.