extract implementation into source from the header.
stuff builds with latest compiler in Mac OS X and works
to some extent though needs a lot of improvement.