Some more progress
Improvements to javascript  and mongo