Tests for SqlModule added.

SqlModule improved and commented.
Tests for SqlModule added.