Adding basic tests, fixing $style, fixing attribute bug

Adding a few test cases utilizing QUnit.
Noticed an issue where attribute would not be added to root object.
$style will no longer require an array of objects, as it added a
superfluous for loop