Basic SQL support.
Fixed sync issue.
Added new command interface