Small refactor on codewrap