Implemented multithreading. #2.

Works for small sites, still has bugs though.