Made edits for pep8 compliance.
Made more edits for pep8 compliance.
Fixed weights bug.