Clean up output messages
Display messages to stderr instead of stdout
Fix case of database name
Break out ScriptTable as a separate function
Update solution for VS2013