Multithread and Config

Added multithread write as well as some other config and unit tests