Add conditions for tariffs
Remove deprecated code