Restructure lib files