Refactor the interpreter into a class

Instead of having the current scope and stdout handler passed around as
arguments everywhere, make them fields in a class.
Implement while loops