Added NULL error checking to nameformatter.
Added a user-defined command matcher. It's not done yet. Also added the implementation of the database helper methods.