restructuring lib files