Merge "Refactor public_libraries.cpp more"