made changes, added maintainer for git, renamed to mainthread, did some commenting and code changes.