Added i to the globals.

That way I don't need to declare it in every function ^^'.