Cleaned up SQL commands