Refactor deck