Reformatting code so it looks more like Java