Fixed bugs/made json parsing integral to worker