Add profile support and cleanup for appops

Change-Id: I13338c3215a676c43db38ccff51242739e98fad2