Added tenant filter to SQL calls; Integrated with latest crypto logic;