Modified to check more and use restler.js to read from a url