Reformatted code to look nicer