restructuring the lib hierarchy