The else on line 504 applies to the if on line 462, but there's no else for line 463?  Unless I'm reading the indents wrong, in which case please correct me.