Refactor into attrs