code reformatting and fragment method factories