Improve SQL-scripts