Refactoring

This should bring everything in line with the article.