First working version

All edge cases except one taken care of. Initial database verification
shows 100% coverage. Next step: repopulating the forum using the
database.