fixed some minor issues
fixed some includes
fixed another include
fixed indentation
removed the need for threading
cleanup
include cleanup