Added a logger, made the app configurable, use prettier formatting and did some refactoring.

- Added logger
- Made configurable
- Prettier formatting
- Refactoring