Reorganize around lib structure