Finish refactor. Comment out old code to avoid compile issues. Add multithreaded example