first attempt at fixing flip encryption
fixed all remaining flip issues. closes #260. closes #213
Merge pull request #261 from piyushk/fix_flip_encryption

Fix flip encryption and all known flip synchronization issues