Changed code layout to be more in line with Google Style guide.