Refactored aes cipher class