Updated to support SQL syntax and functions.