Good progress on problem 18

Figured out that you can't magically have references to things that
don't exist any more - shocking! Fixed all compilation errors and
warnings.
More Problem 18

I think it's very close, just a bit more pointer wrangling to do
first...