Fix some bugs. Add scripts to setup the server to replicate. Should be much closer now.