removed duplicate code fragments added comments
reset header classes and new classes for sorting