Added DalekJS tests
Code cleanup