Added command line arguments and fixed errors

Fixed wrong table name
Forgot to commit previous change to .gitignore