Changed export_database due to PEP8 errors.
Refactored export_database.

- Added action dispatcher.