add memory header
get applied classes
paint background when clearing