Library Enhancements

Major overhaul of the library structure and usage pattern.