added quit/continue option to the mta homework
Spread out distance calcualtions to improve readability