Added version #defines and a CLI flag to print them.

Also made some minor formatting and code style changes.
Added fts_close call.