Fixed makefile issues
Fixed more include warnings
Added timer thread and call to timing function