Refactored trim so enable future import of external behavior modules