Don't be afraid of if-then chains. Smile and put the word REFACTOR in a comment nearby and move on to the next problem. Ship the thing! Perfectionism is overrated.
You're going to spend 100x more time maintaining that disaster than you'd have learning a (to this problem) fundamental algorithm. Shoulders of giants.