Moved all trim logic to the model for plug and play use