Updates to snapshot stored procedures, performance issues with group nesting fixed