Cleaned up SQL snippets