cleaned up ugly formatting in attributewriter and corrected surplus of spaces in functions