Refactor Types