Separated and reorganized library modules; added module stubs.