Improved the quoting of column names.
Added query tests.
Removed console.log.
Added tests for the view.