fixed bugs and cleaned up setting simulation settings