Delete non security classes in correct order