included threads dependencies and cleaned up.