js styling & removing unneeded code