I took a look, it is not so bad, especially if you are a novice.
What I would suggest is to split up the complex functions for multiple ones.
On the other hand I suggest you the page exercism.io, there you can write code and the mentors on the page are giving you reviews with suggestions.
Thank you very much for your advice!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.