trimmed .sql and added handling with tidy.sh