Updated to use fragments