SQL scripts adjusted. Needs further work.