First set of changes, includes support for fragments.