Welcome to Stack Overflow! To get the best quality of answers, please review
How do I ask a good question?. In this particular case, you should include your code inline, not just a link to it (links may die, and then future programmers can't benefit!). Don't just post all of your code though! Instead, construct a
MCVE to narrow down the problem and make it easier on answerers. You should only have one question, and be cautious about opinion questions ("best practice"), as they are out-of-scope for this site. —
Shepmaster 23 secs ago