Refactor set up to be able to specify db host, port and db name.