Refactor with import bugs