File and directive clean up