Bind classes with 'classes' array

pr for #154

This is my first pr for an project not my own.
Hope everything is ok :)