Refactor to package