Fixed a potential crash while saving content
Moving code specific to projects to the ProjectContent class