Final refactor
Final cipher refactor