Modified Add Function to handle non id objects better
Added Jasmine Tests for main.js
Made server run under Node iff we are in Node
lint and style fixes.