Switch to using threads instead of proccess for page gen