Fixxed, but added a TODO to refactor that knot of if-else statements into something readable and extendable.