Code cleanup and small optimization in areatrigger