Made code slightly more consistient