Added DB calls and triggers - verified, Windowing works