changed places where it used storyId to either onlineStoryId or offlineStoryId. Added auto generating of online ids.