Added commenting and changed a bunch of stuff