Made code slightly less hideous