v5.0 Support for multi-threaded applications and few fixes - closes #21 closes #22 and major extensions
fix conflicts