Refactored creation of Fragments to fix problem with multiple instances of ProjectFragment