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
- [ ] Migrate tasks to classes
- [ ] Write tests
- [ ] Fix errors
- [ ] Create Composer package