Fixed many longstanding (and sneaky) bugs

fixed typo that caused north train to always be toggled on
fixed typo that caused toggles to never be reset
replaced if, else if blocks with just if blocks
omg how has this been so terrible for so long?