Added optional device_sn argument to clear app method.