Reformatted code and added comments