Refactoring Cipher project