Library restructure