Adding certificate setup and db optimizer