restructured core/libs