Minor fixes

Typos, documentation improvements and minor refactoring.
Merge pull request #1 from fernandoacorreia/fix-typos2

Minor fixes