Upgraded the functional test to cover more scenarios.
Replaced all tabs with four spaces. Removed some pre-mature test code. Now current with book, page 47.