Removed some dead code from buildFragment. Thanks to Sean Catchpole for the suggestion.