Split this off to it's own thread.