Apache license, shebang comments, minor style changes.