Split attributes into easier categories
Added error checking