Moved topic store and user store into their own files. Tweaked topic store to stop it accessing globals.