fragment: Fix a 10L bug of 46824a001e .
fragment: Split the fragment related stuff into separate files.