Added overlays to a new thread. Plus some bug fixes