Adding master/slave database support (Issue #6).