Added alg factories and added alg stuff
fixed issue in simulator class