Library defs

Working on libraries, in progress