SQL scripts cleaning