Fixed a cash when listing an empty database
Added optimisation when compiling in debug mode, or MD5 and SHA1 won't
work
Protocol initialization is now done during startup