better configured simulation file not tested
removed plotting functions that are not used and cleaned up some other parts of code. Go to previous revision if it's really needed