This needs it's own thread.