candywrapper: code cleanup