Unnecessary javascript functions deleted.