Move inner classes out of replication manager for easier manipulation