Fix quality flaws
Remove unused javascript code