Split lib from main execution flow.