Fixing mistakes, missing definition and redefinition.
Flushing file rather than standard out so that file output works.
Using as git submodule, project changes.