added new tests, and code for javascript active record.