Use where instead of let in a few places to improve readability a bit