Updated code with Paul's initial implementation of the second world (boxed-in).