Comments and style
Renamed constant.
Style cleanup.
Remove unused state_triple struct.
Fix indentation.