fixed NonCopyable errors on Linux by making theMain a pointer.