Added comments and changed bracket formatting