Thread safety on
Refactored alignment, sycnhronization added.