clean up double attr_accessor and other formatting tweaks