Better seperation of concerns in lib