Numerous changes to code, and library name