Update main.cpp

Changed covariance matrix and states to shared variables