Updated code with linting

+Fixed JsLint warnings
+Replace undefined checks with simple check for object
Replace eval with new function()

Because its evil! :p
Merge pull request #12 from mubaidr/master

Updated code with linting