Started major refactor in cipher.rb for a more functional, object oriented style.