Made the code look a bit more like C# and less like Java