Added config and main for SQL support