Remove unused javascript functions