Exercises not use 'var' keyword where possible

This allows the compiler to infer the most specific type for a variable,
and makes the code more flexible.