added has_one and nested attributes relationship for plaintexts
Merge branches 'master' and 'chris'