Scruffy ported from mycpp to libmary