fixes to chain of implications, some updates to library functions