added proper saving and loading of temporal pooler and other bug fixes