Converted directories to use newer version in fdb module.
Fixed typos, added comments, improved names for some variables.