Put part of shared code in a library