script: Fully cleanup code style

Make indentation consistent, add missing semicolons, use strict
comparison operators, etc.