Seriously, what the dink happened to the indenting.  Also added data checking to max # of attributes
Less of a giant mess ( Now has functions)