Refactoring fragment template system to add Droid support