Refactor with a new common package