Now keep track of simulation property values (#112). Also some refactoring.