Cleanup.
Added sql-function CAST.