Started javascript and fixed bugs