Lots of updates to consolidate sql scripts and sample status logging