More debugging
Threading enabled, optimization put in comments