Remove unnecessary javascript in view