more work on dynamic loading, rewritten gid search (now simple to debug and appears to be correct-ish)...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>