refactor database calls, fix set target bug, gitignore

- all database calls rely on refactored database_io module
- condense all calls to all three db into one
- fix bug with setting target to zero being without effect
- add .gitignore with entry for compiled python modules