Move attribute handling logic into separate functions.
Move attribute handling logic into separate functions.

skatejs/skatejs,chrisdarroch/skatejs,skatejs/skatejs,chrisdarroch/skatejs,antitoxic/skatejs,skatejs/skatejs