Dynamically managing fragments