Fix js code for tariffs, some visual changes