Remove legacy javascript code