Imagine you are assigned as a developer to this project and you have to make the first step in refactoring. There are many issues, even though they work.
Please, submit a pull request with the changes you would recommend to do here. Try to spend 15 minutes maximum for the entire work. Don't fix everything, you have to do just the first step in refactoring.
Also, if you think that something else must be refactored further, put your ideas into the description of the pull request.
Thanks!