added cleaning function for attributes, now adds in a lot of sql options and some information added