Indentation and formatting of KGW implementation.

Added missing open { bracket on line 896 for "if" statement. Also fixed indentation and formatting for KGW implementation.