Moved some things into /lib