Create lib directory
DRY up comparison