Refactor the code

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