Minor code cleanup
cleanup extra newline
cleanup wait function
remove silly function
minor syntax cleanup
Cleanup AttachThread
Refactor: cleanup path through addThread