fixed url bug and deleted cruft code