restructure libraries