Initial version, still working around gcc issue