Album JS unit test + JS API bugfixes