Fixed bug in DB

Database was not populating fragment list when loading in stories. It
does this now. Also fixed a bug with the getAllFragments based on
storyid. Broken loop + bad lookup.