Added comments, made it look a little neater