Integrate downloader locking into stack itself. Added more mutex locking for safety. Improved parsing for safety.