Added tests for DBObjects
Tidying up javascript in BSON
Removing warnings