Added style changes and more comments because I was too tired last night