Refactor the code

- [x] Split big files to classes
- [x] Get configuration out of the code
- [x] Create DB handling class
- [x] Create Task class
- [x] Migrate tasks to classes
- [ ] Write tests
- [ ] Fix errors
- [ ] Create Composer package