use singleton_class on base to create attr_accesors for all attributes

This change automatically adds attr_accessor for all attributes