Refactor attempt