:) The nested ternary is definitely hard to follow! 

As far as suggestions, I'd rather continue towards understanding the program's intentions before I try to recommend something, I'm sure you can appreciate that approach!