Refactor abolate code