Fix attribute class and add comentaries