Added generics support. Added possibility to never write classname tags