[ap] Code cleaning.