Move implementation into mini-libraries