implemented the idea of keeping all moments from previous windows until they become too many

changed the names of the functions algorithm1 and algorithm2 since they
were no longer following the ideas from Farhat's paper
implemented the idea of storing and using all moments from the previous
expansion frequencies until these become more than a user-defined
variable