Updated Unit Tests and JS API changes