Added assignment operators, changed openAttribute() to attribute(), fixed a few bugs