Added some validation logic
Added unit tests for client side data.js