Added TODO
simplified mutex
added a mutex to the refresh function in views