Added sanitycheck
Fixed tb. Simulation is now working.