Towards thread-safety

Code standards
Updated todo