Refactor recurring codes