Fixed up if statements and select
Worked on the hardest file so I'm feeling good.