fixed URLs, cleaned code