Cleaned stuff up and made it into one big ol' for loop