move library code away from build code