Added activity and contact saving functionality