pattr & modes cleanup