Rewriting some bits in light of Vogella tutorial.