script: Fully cleanup code style

I've tried to adhere to the existing code style as best as possible.