Initial check-in. Not working yet.
Working code, but a bit fragile.
...