Updates

SQL changes and testing