Remove unused code. Reformat and optimize code.
Merge branch 'develop' of github.com:gitools/gitools into develop