removed an unused piece of code
removed some no longer useful pieces of code
fixed some warnings issued by JSHint