Added a bit more, and got sql working.