Merge pull request #47 from hawesie/hydro-devel

Fixed complilation under Ubuntu.
Adding first pass stuff for replication.
Tested replication and it passes first attempts.