add some refactoring to the idea_store class

There is a lot of duplication in this class that we can change