ADEV-26 : Fixed navigation issues and some other JS issues

Why did we keep this code format?