added comments & fixed some styling