Refactor into Fragment