Refactored to fragments