Removing all threading code