added a config file, improved database params

- moved all configuration options and database creds and other config
options to an external file
- improved the database connection parameters