More library stuff (the codebase is a mess I know, but we're getting there)