added ability to disable database connection + minor bug fixes