clean up, add comments
add support for environment variable overrides
misc changes, ninja file generation started