add real code to calculate total event rate
remove unused line
add some compiler warning flags
remove useless semicolons
add IMeasurement and flesh out simulation loop