Added updated code from gh-pages