Fixes formatting problems and holes in docblocks.
Added test for appendAttribute.