Refactor and add pieces management examples