Reformatted code in NewMain

Also added two ending brackets to get rid of errors.