Use streams in maze compiler.

Also includes some style cleanups.