Some comments for each of the cases in this block wouldn't hurt. Just like 1 quick line for each if statement explaining that case