Removed mori, added threads to improve performance