Refactor handles to yml