Move to fragment logic so more easily expanded upon